package lib.util;

import lib.Dao.CourseUserDAO;
import lib.Dao.TokenDao;
import lib.servlet.AuthUtil;
import net.sf.json.JSONObject;
import lib.util.PostMessage;
import java.sql.SQLException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;


public class GetOpenidList {
    public void getopenid(String cid,String changetype,String coursedata) throws SQLException {

        CourseUserDAO courseUserDAO=new CourseUserDAO();
        PostMessage postMessage=new PostMessage();
        List<String> list=new ArrayList<>();

        try {
            list=courseUserDAO.getCourseUser(cid);
            for(int i=0;i<list.size();i++){
                postMessage.posttoopenid(list.get(i),changetype,coursedata);

            }

        } catch (SQLException e) {
            e.printStackTrace();
        }
       return;
    }
}

